#include "interrupt.h"

void initPIC()
{
	outB(0x20, 0x11);
	outB(0xA0, 0x11);
	outB(0x21, 0x20);
	outB(0xA1, 0x28);
	outB(0x21, 0x04);
	outB(0xA1, 0x02);
	outB(0x21, 0x01);
	outB(0xA1, 0x01);
	outB(0x21, 0x0);
	outB(0xA1, 0x0);
}

void sendEOI(unsigned char irq)
{
	if(irq >= 8)
	{
		outB(PIC_SLAVE_BEFEHL, PIC_EOI);
	}
	
	outB(PIC_MASTER_BEFEHL, PIC_EOI);
}
